package com.regent.central.bill.core.mrp;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Table(name = "central_bill_material_purchase_sku")
public class BillMaterialPurchaseSku {
    @Id
    private String id;

    /**
     * 记录版本
     */
    private Integer version;

    @Column(name = "date_created")
    private Date dateCreated;

    @Column(name = "date_updated")
    private Date dateUpdated;

    @Column(name = "time_deleted")
    private Long timeDeleted;

    /**
     * 物料采购单ID
     */
    @Column(name = "bill_material_purchase_id")
    private String billMaterialPurchaseId;

    /**
     * 工单ID
     */
    @Column(name = "fac_mission_id")
    private String facMissionId;

    /**
     * 物料skuID
     */
    @Column(name = "common_materials_sku_id")
    private String commonMaterialsSkuId;

    /**
     * 采购数量
     */
    @Column(name = "quantity_purchase")
    private BigDecimal quantityPurchase;

    /**
     * 已到料数量
     */
    @Column(name = "quantity_arrive")
    private BigDecimal quantityArrive;

    /**
     * 到料状态 0: 未到料 1: 未到齐 3: 已到齐
     */
    @Column(name = "arrive_status")
    private Integer arriveStatus;

    /**
     * 到料状态改变类型 0: 系统自动改变 1: 用户手动改变
     */
    @Column(name = "arrive_status_change_type")
    private Integer arriveStatusChangeType;

    /**
     * @return id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 获取记录版本
     *
     * @return version - 记录版本
     */
    public Integer getVersion() {
        return version;
    }

    /**
     * 设置记录版本
     *
     * @param version 记录版本
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * @return date_created
     */
    public Date getDateCreated() {
        return dateCreated;
    }

    /**
     * @param dateCreated
     */
    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }

    /**
     * @return date_updated
     */
    public Date getDateUpdated() {
        return dateUpdated;
    }

    /**
     * @param dateUpdated
     */
    public void setDateUpdated(Date dateUpdated) {
        this.dateUpdated = dateUpdated;
    }

    /**
     * @return time_deleted
     */
    public Long getTimeDeleted() {
        return timeDeleted;
    }

    /**
     * @param timeDeleted
     */
    public void setTimeDeleted(Long timeDeleted) {
        this.timeDeleted = timeDeleted;
    }

    /**
     * 获取物料采购单ID
     *
     * @return bill_material_purchase_id - 物料采购单ID
     */
    public String getBillMaterialPurchaseId() {
        return billMaterialPurchaseId;
    }

    /**
     * 设置物料采购单ID
     *
     * @param billMaterialPurchaseId 物料采购单ID
     */
    public void setBillMaterialPurchaseId(String billMaterialPurchaseId) {
        this.billMaterialPurchaseId = billMaterialPurchaseId;
    }

    /**
     * 获取工单ID
     *
     * @return fac_mission_id - 工单ID
     */
    public String getFacMissionId() {
        return facMissionId;
    }

    /**
     * 设置工单ID
     *
     * @param facMissionId 工单ID
     */
    public void setFacMissionId(String facMissionId) {
        this.facMissionId = facMissionId;
    }

    /**
     * 获取物料skuID
     *
     * @return common_materials_sku_id - 物料skuID
     */
    public String getCommonMaterialsSkuId() {
        return commonMaterialsSkuId;
    }

    /**
     * 设置物料skuID
     *
     * @param commonMaterialsSkuId 物料skuID
     */
    public void setCommonMaterialsSkuId(String commonMaterialsSkuId) {
        this.commonMaterialsSkuId = commonMaterialsSkuId;
    }

    /**
     * 获取采购数量
     *
     * @return quantity_purchase - 采购数量
     */
    public BigDecimal getQuantityPurchase() {
        return quantityPurchase;
    }

    /**
     * 设置采购数量
     *
     * @param quantityPurchase 采购数量
     */
    public void setQuantityPurchase(BigDecimal quantityPurchase) {
        this.quantityPurchase = quantityPurchase;
    }

    /**
     * 获取已到料数量
     *
     * @return quantity_arrive - 已到料数量
     */
    public BigDecimal getQuantityArrive() {
        return quantityArrive;
    }

    /**
     * 设置已到料数量
     *
     * @param quantityArrive 已到料数量
     */
    public void setQuantityArrive(BigDecimal quantityArrive) {
        this.quantityArrive = quantityArrive;
    }

    /**
     * 获取到料状态 0: 未到料 1: 未到齐 3: 已到齐
     *
     * @return arrive_status - 到料状态 0: 未到料 1: 未到齐 3: 已到齐
     */
    public Integer getArriveStatus() {
        return arriveStatus;
    }

    /**
     * 设置到料状态 0: 未到料 1: 未到齐 3: 已到齐
     *
     * @param arriveStatus 到料状态 0: 未到料 1: 未到齐 3: 已到齐
     */
    public void setArriveStatus(Integer arriveStatus) {
        this.arriveStatus = arriveStatus;
    }

    /**
     * 获取到料状态改变类型 0: 系统自动改变 1: 用户手动改变
     *
     * @return arrive_status_change_type - 到料状态改变类型 0: 系统自动改变 1: 用户手动改变
     */
    public Integer getArriveStatusChangeType() {
        return arriveStatusChangeType;
    }

    /**
     * 设置到料状态改变类型 0: 系统自动改变 1: 用户手动改变
     *
     * @param arriveStatusChangeType 到料状态改变类型 0: 系统自动改变 1: 用户手动改变
     */
    public void setArriveStatusChangeType(Integer arriveStatusChangeType) {
        this.arriveStatusChangeType = arriveStatusChangeType;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BillMaterialPurchaseSku that = (BillMaterialPurchaseSku) o;

        if (billMaterialPurchaseId != null ? !billMaterialPurchaseId.equals(that.billMaterialPurchaseId) : that.billMaterialPurchaseId != null)
            return false;
        if (facMissionId != null ? !facMissionId.equals(that.facMissionId) : that.facMissionId != null) return false;
        return commonMaterialsSkuId != null ? commonMaterialsSkuId.equals(that.commonMaterialsSkuId) : that.commonMaterialsSkuId == null;
    }

    @Override
    public int hashCode() {
        int result = billMaterialPurchaseId != null ? billMaterialPurchaseId.hashCode() : 0;
        result = 31 * result + (facMissionId != null ? facMissionId.hashCode() : 0);
        result = 31 * result + (commonMaterialsSkuId != null ? commonMaterialsSkuId.hashCode() : 0);
        return result;
    }
}